xen/arm: Introduce enable callback to enable a capabilities on each online CPU
authorJulien Grall <julien.grall@linaro.org>
Tue, 16 Jan 2018 14:23:33 +0000 (14:23 +0000)
committerStefano Stabellini <sstabellini@kernel.org>
Wed, 17 Jan 2018 21:44:29 +0000 (13:44 -0800)
commit7500495155aacce437878cb576f45224ae984f40
tree7f89aa24177ff6c5e9caab5e6dd3d41ee622f550
parent8d2983ec793362e8bcbe1a9a36d3eee61bc187f0
xen/arm: Introduce enable callback to enable a capabilities on each online CPU

Once Xen knows what features/workarounds present on the platform, it
might be necessary to configure each online CPU.

Introduce a new callback "enable" that will be called on each online CPU to
configure the "capability".

The code is based on Linux v4.14 (where cpufeature.c comes from), the
explanation of why using stop_machine_run is kept as we have similar
problem in the future.

Lastly introduce enable_errata_workaround that will be called once CPUs
have booted and before the hardware domain is created.

This is part of XSA-254.

Signed-of-by: Julien Grall <julien.grall@linaro.org>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/cpuerrata.c
xen/arch/arm/cpufeature.c
xen/arch/arm/setup.c
xen/include/asm-arm/cpuerrata.h
xen/include/asm-arm/cpufeature.h